home *** CD-ROM | disk | FTP | other *** search
/ PC for Alla 2005 April / PC för Alla 0504.iso / noje / arcade-3.6.exe / tetris.swf / scripts / frame_24 / DoAction.as
Encoding:
Text File  |  2003-11-29  |  656 b   |  36 lines

  1. stop();
  2. pause_btn.onPress = function()
  3. {
  4.    if(gameOver || quitGame_mc._visible)
  5.    {
  6.       return undefined;
  7.    }
  8.    sound_mc.gotoAndPlay("popMed");
  9.    b_mc._visible = !(paused_mc._visible = paused = !paused);
  10.    if(paused)
  11.    {
  12.       stopFall();
  13.    }
  14.    else
  15.    {
  16.       startFall();
  17.    }
  18. };
  19. quit_btn.onPress = function()
  20. {
  21.    if(gameOver)
  22.    {
  23.       return undefined;
  24.    }
  25.    sound_mc.gotoAndPlay("popMed");
  26.    stopFall();
  27.    b_mc._visible = paused_mc._visible = false;
  28.    quitGame_mc._visible = paused = true;
  29. };
  30. drawNextShape();
  31. thisShape = nextShape;
  32. drawThisShape();
  33. drawNextShape();
  34. gameOver = false;
  35. startFall();
  36.